package com.xiangxg.jvm.classloader;


public class MyTest10 {
    static {
        System.out.println("MyTest10 static block");
    }

    public static void main(String[] args) {
       Parent2 parent2;
        System.out.println("--------");
        parent2 = new Parent2();
        System.out.println("--------");
        System.out.println(Parent2.a);
        System.out.println("--------");
        System.out.println(child2.b);
    }
}
class Parent2{
    static int a = 3;
    static {
        System.out.println("Parent2 static block");
    }
}
class child2 extends Parent2{
    static int b = 4;
    static {
        System.out.println("child2 static block");
    }

}
